package com.zk.ppa.service.impl;

import com.zk.ppa.dao.po.Relocate;
import com.zk.ppa.dao.repository.RelocateRepository;
import com.zk.ppa.service.RelocateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author fengq
 */
@Service
public class RelocateServiceImpl implements RelocateService {
    @Autowired
    private RelocateRepository relocateRepository;

    @Override
    public Boolean saveRelocate(Relocate relocate) {
        return relocateRepository.save(relocate);
    }

    @Override
    public Boolean updateRelocateById(Relocate relocate) {
        return relocateRepository.updateById(relocate);
    }

    @Override
    public Boolean deleteRelocateById(Long id) {
        return relocateRepository.removeById(id);
    }

    @Override
    public Boolean deleteBatchRelocateByIds(List<Long> ids) {
        return relocateRepository.removeByIds(ids);
    }
}
